from django.urls import path

from . import views

urlpatterns = [
    path('register/', views.RegisterView.as_view(), name='register'),
    path('login/', views.LoginView.as_view(), name='login'),
    path('username/<username>/count/', views.UserNameCountView.as_view()),
    path('mobile/<mobile>/', views.UserMobileCountView.as_view()),
    path('logout/', views.LogoutView.as_view(), name='logout'),
    path('center/', views.UserCenterInfoView.as_view(), name='info'),
    path('emails/', views.EmailView.as_view(), name='email'),
    path('activate_email/', views.EmailActivateView.as_view()),
    path('addresses/', views.AddressView.as_view(), name='address'),
    path('create_addresses/', views.CreateAddressView.as_view()),
    path('update_addresses/<address_id>/', views.UpdateAddressView.as_view()),
    path('addresses/<address_id>/default/',
         views.DefaultAddressView.as_view()),
    path('addresses/<address_id>/title/', views.UpdateAddressView.as_view()),
    path('change_password/', views.ChangePasswordView.as_view(),
         name='change_password'),
    path('browse_histories/', views.AddUserHistoryView.as_view())

]
